<?php

	require_once("../connectMysql/connetMysql.class.php");
	
	$UserPhone=$_POST['userPhone'];
	
	$db=new connetMysql;
	$con=$db->getConnect();
	$get_idsql="SELECT UserId FROM user WHERE UserPhone='".$UserPhone."'";
	
	$result=$con->query($get_idsql);
	$row = mysqli_fetch_assoc($result);
	$Userid=$row['UserId'];
	
	$petname=$_POST['petname'];
	$usersex=$_POST['usersex'];
	$opencontact=$_POST['opencontact'];
	$title=$_POST['title'];//g个人描述
	$eduexper=$_POST['eduexper'];
	$usertype=$_POST['usertype'];
	$skill=$_POST['skill'];
	$userbirth=$_POST['userbirth'];
	$homeArea=$_POST['homeArea'];
	$liveArea=$_POST['liveArea'];
	$intro=$_POST['intro'];//工作经历
	
	date_default_timezone_set('PRC');
    $ActPublishTime=date("Y-m-d h:i:s");	
	
		$sql = "UPDATE user SET UserName='".$petname."',userSexa='".$usersex."',userAgea='".$userbirth."',userTypea='".$usertype."',UserDescri='".$title."',homeArea='".$homeArea."',liveArea='".$liveArea."',Skill='".$skill."',OpenContact='".$opencontact."',WorkExper='".$intro."',EduExper='".$eduexper."' WHERE UserId=".$Userid;

		
		$result = mysqli_query($con,$sql);
		
		$success_respon = array('code' => 'USERINFO_SUCCESS_UPDATE', 'msg' => '1');
		echo json_encode($success_respon);
		$con->close(); 
		
		
	
?>